package com;

import org.apache.commons.beanutils.BeanUtils;

import java.lang.reflect.InvocationTargetException;
import java.util.Map;

/**
 * @description:
 * @author: sksun2
 * @create: 2023-07-08
 */
public class BaseParam {

    public Map<String,String> toMap()  {

        Map<String, String> describe = null;
        try {
            describe = BeanUtils.describe(this);
        } catch (IllegalAccessException e) {
            throw new RuntimeException(e);
        } catch (InvocationTargetException e) {
            throw new RuntimeException(e);
        } catch (NoSuchMethodException e) {
            throw new RuntimeException(e);
        }


        return describe;
    }
}
